package cloud.xlh.digital_power_order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringApplicationRunListener;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/8/6 21:07
 * @ Description:
 */
public class LoadDataSpringApplicationRunListener implements SpringApplicationRunListener {

    private final SpringApplication application;
    private final String[] args;

    public LoadDataSpringApplicationRunListener(SpringApplication sa, String[] args) {
        this.application = sa;
        this.args = args;
    }

    public void running(ConfigurableApplicationContext context) {
        loadTask();
    }

    private void loadTask() {
        //2s执行一次
        //new Timer().schedule(new GenOrderNoTimerTask(), 0, 2000);
    }
}
